<template>
  <div>
    <iframe
      :src="url"
      frameborder="0"
      id="show-iframe"
      allowfullscreen
      sameorigin
    >
    </iframe>
  </div>
</template>



<script>
export default {
  name: "Web",
  props: {
    url: String,
  },
  mounted() {
    // if (self === top) {
    //   var antiClickjack = document.getElementById("show-iframe");
    //   antiClickjack.parentNode.removeChild(antiClickjack);
    // } else {
    //   top.location = self.location;
    // }
    const oIframe = document.getElementById("show-iframe");
    const deviceWidth = document.documentElement.clientWidth;
    const deviceHeight = document.documentElement.clientHeight;
    oIframe.style.width = deviceWidth + "px";
    oIframe.style.height = deviceHeight + "px";
  },
};
</script>

